# 获取用户输入的体重
weights = []
while True:
    weight = input("请输入体重（公斤），输入 q 结束：")
    if weight == 'q':
        break
    try:
        weights.append(float(weight))
    except ValueError:
        print("输入错误，请输入数字或 q。")

# 计算平均体重
if weights:
    averweight = sum(weights) / len(weights)
    print("平均体重：", averweight, "公斤")

    # 输出比平均体重更重的体重
    print("需要锻炼的体重：")
    for weight in weights:
        if weight > averweight:
            print(weight)
else:
    print("没有输入任何体重。")
